package com.java.day03;
/**
 * 案例：从1加到100，输出和大于888的那个数
 * */
public class Demo01 {
    public static void main(String[] args) {
        int sum = 0;
        for (int i = 1; i <= 100; i++) {
            sum+=i;
            if(sum>888){
                System.out.println(i);
                break;
            }
        }
        System.out.println("sum="+sum);
    }
}
